package Task30;

import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int n = scanner.nextInt();
            if( n == 0){
                break;
            }else if( n <= 3){
                System.out.println(1);
            } else {
                int count = 1;
                while (n > 3){
                    if( n % 3 == 0){
                        n = n / 3;
                    }else {
                        n = n/3 + 1;
                    }
                    count++;
                }
                System.out.println(count);
            }
        }
    }
}
